create table HotelType
(
	 [HotelTypeId] int identity(1, 1) primary key
	,[HotelTypeName] nvarchar(128)
	,[CreatedBy] int
	,[CreatedDate] datetime
	,[UpdatedBy] int
	,[UpdatedDate] datetime
	,[Status] int
)
go

CREATE PROCEDURE HotelTypeGet
	@HotelTypeId int
AS
SELECT *
FROM [HotelType]
WHERE [HotelType].[HotelTypeId] = @HotelTypeId
GO

CREATE PROCEDURE HotelTypeList
AS
SELECT *
FROM [HotelType]
GO

CREATE PROCEDURE HotelTypeInsert
	 @HotelTypeName nvarchar(128)
	,@CreatedBy int
	,@CreatedDate datetime
	,@UpdatedBy int
	,@UpdatedDate datetime
	,@Status int
AS

INSERT INTO HotelType (
	 [HotelTypeName]
	,[CreatedBy]
	,[CreatedDate]
	,[UpdatedBy]
	,[UpdatedDate]
	,[Status]
	
) VALUES (
	 @HotelTypeName
	,@CreatedBy
	,@CreatedDate
	,@UpdatedBy
	,@UpdatedDate
	,@Status
	
)

select SCOPE_IDENTITY()
GO

CREATE PROCEDURE HotelTypeUpdate
	@HotelTypeId int, 
	@HotelTypeName nvarchar(128), 
	@CreatedBy int, 
	@CreatedDate datetime, 
	@UpdatedBy int, 
	@UpdatedDate datetime, 
	@Status int 
AS
UPDATE HotelType SET
	    [HotelTypeName] = @HotelTypeName
	   ,[CreatedBy] = @CreatedBy
	   ,[CreatedDate] = @CreatedDate
	   ,[UpdatedBy] = @UpdatedBy
	   ,[UpdatedDate] = @UpdatedDate
	   ,[Status] = @Status
WHERE [HotelType].[HotelTypeId] = @HotelTypeId
GO

CREATE PROCEDURE HotelTypeDelete
	@HotelTypeId int  
AS
DELETE FROM HotelType
WHERE [HotelType].[HotelTypeId] = @HotelTypeId
GO